<?php
$pages = $this->pages;
?>
<div class="content-box">

    <div class="content-box-header">
        <h3>Pages</h3>
        <ul class="content-box-tabs">
            <li><a class="default-tab" href="#tab1">Tree</a></li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
            <div id="tree-control">
                <input type="button" id="create" value="Add new" class="btn "/>
                <input type="button" id="remove" value="Remove" class="btn"/>
                <input type="button" id="rename" value="Rename" class="btn"/>
            </div>
            <div id="tree">
                <?php echo $this->partial('/pages/tree.phtml', array('pages' => $pages)) ?>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $().ready(function () {
        var options = {
            edit:'/admin/pages/edit/id/',
            dnd:'/admin/pages/dnd',
            add:'/admin/pages/add'
        }
        initTree(options);
    });
</script>